<template>
  <a-modal title='流程图' :visible='visible' @cancel='visible=false' width='900px' footer>
    <flow-view :xmlData="xmlData" :taskList="taskData"/>
  </a-modal>
</template>
<script>
import FlowView from '@/views/workflow/flowView'
import { viewXmlData } from '@/api/workflow/workflow'

export default {
  name: 'Flow',
  components: {
    FlowView
  },
  props: {
  },
  data () {
    return {
      visible: false,
      xmlData: {},
      taskData: []
    }
  },
  methods: {
    show (deploymentId) {
      this.visible = true
      viewXmlData(deploymentId).then(res => {
        if (res.code === 200) {
          this.xmlData = res.data
          this.title = '查看流程图'
        }
      })
    }
  }
}
</script>
